<template>
<div class="main">
  <div>{{all_myrest_ProductMore==null?'':''}}</div>
  <!--<div class=""><img v-bind:src="all_myrest_ProductMore" /></div>-->
  <div class="imgwrap"></div>
  <!--<p>hhfsjgkl快乐十分的地方回家的路上罚款黄金时代放开了</p>-->
</div>
</template>
<script>
  import stores from './mystore.js'
  import Vue from 'vue';
  import { XButton, XInput,Group, Tab, TabItem } from 'vux'
  import { mapGetters,mapActions } from 'vuex'
  import sha1 from 'js-sha1'

  export default {
      data(){
          return {
              mypayload:{
              },
              buypayload:{
              },
              tuwenPayload:{
                  url:'duodata',
                  actionName:"ProductMore",
                  postData: {
                      productId:"117",
                      //password:"112233",
                      //treeView:"true"
                  }
              },

          }
      },

      computed:{
          all_myrest_ProductMore(){
              var dataval=this.$store.getters.all_restful_ProductMore;
              if(dataval){
                  //return dataval
                  //return dataval.body.productMore.split(" ")[1].split("=")[1].split("\"")[1]
                  $(".imgwrap").append(dataval.body.productMore)
                  $(".imgwrap img").css("width","100%")
                  return dataval.body.productMore
              }else{
                  return null
              }
              //return dataval;
          },
          all_myrest(){
              return this.$store.getters.all_logindata
          },

      },
      created (){
          this.tuwen();
         // this.cntReady();
          //console.log('hahahahhahahahah'+this.cntReady())
          console.log('hahhahahahhahahaha::::::'+this.cntReady())
      },

      methods:{
          doesh (){
            this.$store.commit('restful_api',this.QueryUserPayload)
          },
          GetQueryString:function(name){
              var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
              var r = document.URL.split("?")[1].match(reg);
              //alert("ddd:"+window.location.search)
              if(r!=null)return  unescape(r[2]); return null;
          },
          tuwen:function(){
              var pid=this.$route.params.pid;
              this.tuwenPayload.postData.productId=pid;
              console.log("pid:::::"+pid)
            //alert(this.tuwenPayload.productId)
              this.$store.commit('restful_api',this.tuwenPayload);
          },
        /*  cntReady(){
              console.info(3434343);
              this.$store.commit('restful_api',this.mypayload);
           },
          ...mapActions([
              'increment',
              'decrement',
              'incrementIfOdd'
          ]),
        */
      },
      components: { XButton, Group, XInput, Tab, TabItem }

  }

</script>

<style scoped>
  *{ margin:0; padding:0;}
  html,body,.main{ width:100%;}
  .main img{ width:100%; }
  p{ width: 300px;}
  p img{ width: 100%;}
</style>
